package com.zhuge_new.Dialog;

import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

import com.flyco.dialog.widget.base.BaseDialog;
import com.zhuge_new.Activity.SendPackActivity;
import com.zhuge_new.R;

import static com.zhuge_new.R.style.Dialog_Msg;

/**
 * Created by lenovo on 2018-09-07.
 * @@赵   实名成功对话框
 */

public class Autonym_succeedDialog extends BaseDialog<Autonym_succeedDialog>{
    /**
     * method execute order:
     * show:constrouctor---show---oncreate---onStart---onAttachToWindow
     * dismiss:dismiss---onDetachedFromWindow---onStop
     *
     * @param context
     */

    private Context context;
    private Button send_packetv;

    public Autonym_succeedDialog(Context context) {
        super(context);
        setDialogTheme();
        this.context=context;
    }
    private void setDialogTheme() {
        requestWindowFeature(R.style.Dialog_Msg);// android:windowNoTitle
    }



    @Override
    public View onCreateView() {
        widthScale(0.8f);
        View view=View.inflate(context,R.layout.autonym_dialog,null);
        send_packetv = view.findViewById(R.id.send_packet);
        return view;
    }

    /**
     * set Ui data or logic opreation before attatched window(在对话框显示之前,设置界面数据或者逻辑)
     */
    @Override
    public void setUiBeforShow() {
        send_packetv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(context,SendPackActivity.class);
                context.startActivity(intent);
            }
        });
    }


}
